<template>
  <view class="play-page">
    <image class="bg-image" src="/static/images/天机阁微信小程序/bg.png" mode="widthFix" />
    <view class="title"></view>
    <view class="header-container">
      <view class="location">
        <text class="location-label">北京市</text>
        <view class="location-triangle"></view>
      </view>
      <view class="search"></view>
    </view>
    <view class="kingkong-nav">
      <view
        v-for="(item, idx) in kingkongList"
        :key="item.label"
        :class="['kingkong-item', { active: idx === activeKingkongIndex }]"
        @click="activeKingkongIndex = idx"
      >
        <view class="kingkong-icon-wrap" :style="item.wrapStyle">
          <image :src="item.icon" class="kingkong-icon" mode="aspectFill" />
        </view>
        <text class="kingkong-label">{{ item.label }}</text>
      </view>
    </view>
    <view class="kingkong-content">
      <text v-if="activeKingkongIndex === 0">这里是首页内容</text>
      <text v-else-if="activeKingkongIndex === 1">这里是剧本杀内容</text>
      <text v-else-if="activeKingkongIndex === 2">这里是桌游内容</text>
      <text v-else-if="activeKingkongIndex === 3">这里是密室逃脱内容</text>
      <text v-else-if="activeKingkongIndex === 4">这里是酒吧内容</text>
    </view>
  </view>
</template>

<script>
export default {
  name: 'PlayTabContent',
  data() {
    return {
      activeKingkongIndex: 0,
      kingkongList: [
        {
          label: '首页',
          icon: '/static/images/天机阁微信小程序/主页.png',
          wrapStyle: {
            width: '120rpx',
            height: '120rpx',
            borderRadius: '54rpx',
            background: '#d8fff3e6',
            border: '3rpx solid #93f600',
            boxShadow: '0 3rpx 20rpx #38d3ae33, 0 0 50rpx #ffffff'
          }
        },
        {
          label: '剧本杀',
          icon: '/static/images/天机阁微信小程序/剧本杀.png',
          wrapStyle: {
            borderRadius: '54rpx',
            background: '#dff8ffe6',
            border: '3rpx solid transparent',
            boxShadow: '0 3rpx 20rpx #7eb6ff4d, 0 0 50rpx #ffffff'
          }
        },
        {
          label: '桌游',
          icon: '/static/images/天机阁微信小程序/桌游.png',
          wrapStyle: {
            borderRadius: '54rpx',
            background: '#f8e6ffe6',
            border: '3rpx solid transparent',
            boxShadow: '0 3rpx 20rpx #ffb6ff4d, 0 0 50rpx #ffffff'
          }
        },
        {
          label: '密室逃脱',
          icon: '/static/images/天机阁微信小程序/迷失.png',
          wrapStyle: {
            borderRadius: '54rpx',
            background: '#ffe6e6e6',
            border: '3rpx solid transparent',
            boxShadow: '0 3rpx 20rpx #ff76764d, 0 0 50rpx #ffffff'
          }
        },
        {
          label: '酒吧',
          icon: '/static/images/天机阁微信小程序/酒吧.png',
          wrapStyle: {
            borderRadius: '54rpx',
            background: '#fffbe6e6',
            border: '3rpx solid transparent',
            boxShadow: '0 3rpx 20rpx #ffe97e4d, 0 0 50rpx #ffffff'
          }
        },
      ],
    }
  },
}
</script>

<style scoped>
.play-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  font-size: 32rpx;
  position: relative;
}
.bg-image {
  width: 750rpx;
  height: 540rpx;
  border-radius: 0rpx;
  opacity: 1;
  margin-top: 0;
}
.play-page text {
  margin-top: 40rpx;
  z-index: 1;
  position: relative;
}
.title {
  position: absolute;
  left: 28rpx;
  top: 97rpx;
  width: 704rpx;
  height: 60rpx;
  background: transparent;
}
.header-container {
  position: absolute;
  left: 28rpx;
  top: 97rpx;
  display: flex;
  align-items: center;
  height: 60rpx;
}
.location {
  display: flex;
  align-items: center;
  height: 60rpx;
}
.location-label {
  font-family: "PingFang SC Medium", sans-serif;
  font-weight: 500;
  font-size: 32rpx;
  line-height: 32rpx;
  color: #0a0c08;
}
.search {
  margin-left: 20rpx;
  width: 393rpx;
  height: 60rpx;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 30rpx;
  border: 1rpx solid #ffffff99;
  backdrop-filter: blur(30rpx);
  -webkit-backdrop-filter: blur(30rpx);
}
.location-triangle {
  margin-left: 6rpx;
  width: 0;
  height: 0;
  border-left: 7rpx solid transparent;
  border-right: 7rpx solid transparent;
  border-top: 11.45rpx solid #0a0c08;
  margin-top: 4rpx;
}
.kingkong-nav {
  position: absolute;
  left: 28rpx;
  top: 195rpx;
  width: 694rpx;
  height: 169rpx;
  background: transparent;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  z-index: 2;
}
.kingkong-item {
  width: 120rpx;
  height: 120rpx;
  margin-right: 18rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.kingkong-item:last-child {
  margin-right: 0;
}
.kingkong-icon-wrap {
  width: 120rpx;
  height: 120rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8rpx;
}
.kingkong-item.active .kingkong-icon-wrap {
  border-color: #93f600;
}
.kingkong-icon {
  width: 78rpx;
  height: 78rpx;
  border-radius: 0;
}
.kingkong-label {
  width: 100%;
  text-align: center;
  font-family: "PingFang SC", sans-serif;
  font-size: 24rpx;
  line-height: 32rpx;
  color: #282b2a;
  font-weight: 400;
  margin-top: 0rpx;
  transition: font-weight 0.2s, color 0.2s;
}
.kingkong-item.active .kingkong-label {
  font-family: "PingFang SC Heavy", "PingFang SC", sans-serif;
  font-weight: 900;
  font-size: 28rpx;
  line-height: 32rpx;
  color: #282b2a;
}
.kingkong-content {
  margin-top: 400rpx;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32rpx;
  color: #333;
}
</style> 